package Zuoye.zuoye5;

import java.util.Scanner;

public class Test {
    public  static  void paymoney(Money money){
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入金额：");
        double money1 = sc.nextDouble();
        money.payMoney(money1);


    }
    public static void main(String[] args) {

        System.out.println("欢迎来到会员卡支付系统");
        Money yang = new Jinka("冀B34", "张三", 123456789, 1000);
        Money yang1 = new Yinka("鲁A12", "李四", 123456789, 500);
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入会员卡类型：1. 金卡 2. 银卡");
        String type = sc.next();
        switch ( type){
            case "1":
                paymoney( yang);
                break;
            case "2":
                paymoney( yang1);
                break;
            default:
                System.out.println("会员卡不存在");
                break;
        }
        System.out.println();
        System.out.println();

    }
}
